package com.restful.resources;

import java.util.HashMap;

import com.restful.test.UserInfo;

public enum UserInfoResources{
	/*
	 * A mock data provider using HashMap
	 * TODO: substitute singleton with Spring context for instance mgmt  
	 * */
	instance;
	private HashMap<String,UserInfo> contentProvider = new HashMap<String,UserInfo>();
	private UserInfoResources(){
		UserInfo user1 = new UserInfo("Li" , "Ann Arbor");
		UserInfo user2 = new UserInfo("Bruce" , "Lansing");
		contentProvider.put("1", user1);
		contentProvider.put("2", user2);
	}
	public HashMap<String,UserInfo> getModel(){
		return contentProvider;
	}
}
